package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the validation_rules database table.
 * 
 */
@Entity
@Table(name="validation_rules")
@NamedQueries({
@NamedQuery(name="ValidationRules.findAll", query="SELECT v FROM ValidationRules v"),
@NamedQuery(name="ValidationRules.deleteById", query="DELETE FROM ValidationRules WHERE validationRulesId = :P1")
})
public class ValidationRules implements Serializable {

	private static final long serialVersionUID = -8406782571295560942L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="validation_rule_id")
	private Integer validationRulesId;

	@Temporal(TemporalType.DATE)
	@Column(name="created_on")
	private Date createdOn;

	@Temporal(TemporalType.DATE)
	@Column(name="end_date")
	private Date endDate;

	@Column(name="predefined_rules")
	private String predefinedRules;

	@Temporal(TemporalType.DATE)
	@Column(name="start_date")
	private Date startDate;

	private String value;

	//bi-directional many-to-one association to Staff
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="created_by_staff_id")
	private Staff staff;

	public Integer getValidationRulesId() {
		return this.validationRulesId;
	}

	public void setValidationRulesId(Integer validationRulesId) {
		this.validationRulesId = validationRulesId;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getPredefinedRules() {
		return this.predefinedRules;
	}

	public void setPredefinedRules(String predefinedRules) {
		this.predefinedRules = predefinedRules;
	}

	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public String getValue() {
		return this.value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

}